Data and Code for Diabetes-mortality paper

==================
Data (all public):
==================
- HRS:
	RAND HRS Longitudinal File 2020 V2 (randhrs1992_2020v2.dta - https://hrsdata.isr.umich.edu/data-products/rand-hrs-longitudinal-file-2020)
	Harmonized HRS Version D (H_HRS_d.dta - https://hrsdata.isr.umich.edu/data-products/gateway-harmonized-hrs)
	RAND HRS 2010 Fat File (hd10f6a.dta - https://hrsdata.isr.umich.edu/data-products/2010-rand-hrs-fat-file)
	RAND HRS 2012 Fat File (h12f3a.dta - https://hrsdata.isr.umich.edu/data-products/2012-rand-hrs-fat-file)
	2010 Biomarker (BIOMK10BL_R.dta - https://hrsdata.isr.umich.edu/data-products/2010-biomarker-data)
	2012 Biomarker (BIOMK12BL_R.dta - https://hrsdata.isr.umich.edu/data-products/2012-biomarker-data)

- MHAS:
	Harmonized MHAS Version C2 (H_MHAS_c2.dta - https://www.mhasweb.org/DataProducts/HarmonizedData.aspx)
	Master Followup Fie 2021 (master_follow_up_file_2021.dta - https://www.mhasweb.org/DataProducts/MasterFollowUp.aspx)
	2012 Biomarkers (sec_l_biomarkers_2012.dta - https://www.mhasweb.org/DataProducts/AncillaryStudies.aspx)
	2015 Next-of-Kin (sect_sa_sb_sc_sd_se_sh_si_2015.dta - https://www.mhasweb.org/DataProducts/CoreSurveyData.aspx)
	2018 Next-of-Kin (sect_sa_sb_sc_sd_se_sh_si_2018.dta - https://www.mhasweb.org/DataProducts/CoreSurveyData.aspx)
	2021 Next-of-Kin (sect_sa_sb_sc_sd_se_sh_si_2021.dta - https://www.mhasweb.org/DataProducts/CoreSurveyData.aspx)

- CHARLS:
	Harmonized CHARLS Version D (H_CHARLS_D_Data.dta - https://charls.charlsdata.com/pages/Data/harmonized_charls/en.html)
	2011 (https://charls.charlsdata.com/pages/Data/2011-charls-wave1/en.html)
		Blood_20140429.dta; demographic_background.dta; health_care_and_insurance.dta; health_status_and_functioning.dta; weight.dta
	2013 (https://charls.charlsdata.com/pages/Data/2013-charls-wave2/en.html)
		- Exit_Interview.dta; Weights.dta
	2014 (https://charls.charlsdata.com/pages/Data/2014-charls-wave3/en.html)
		- Demographic_Backgrounds.dta; Sample_Infor.dta
	2015 (https://charls.charlsdata.com/pages/Data/2015-charls-wave4/en.html)
		- Sample_Infor.dta
	2018 (https://charls.charlsdata.com/pages/Data/2018-charls-wave4/en.html)
		- Sample_Infor.dta
	2020 (https://charls.charlsdata.com/pages/Data/2020-charls-wave5/en.html)
		- Sample_Infor.dta; Exit_Module.dta; Health_Status_and_Functioning.dta; Sample_Infor.dta


===============
Data Structure:
===============
- HRS: Data/Raw/HRS/all-data-goes-here
- MHAS: Data/Raw/MHAS/all-data-goes-here
- Harmonized CHARLS: Data/Raw/CHARLS/H_CHARLS_D_Data.dta-goes-here
- 2011 CHARLS: Data/Raw/CHARLS/2011/2011-data-goes-here
- 2013 CHARLS: Data/Raw/CHARLS/2013/2013-data-goes-here
- 2014 CHARLS: Data/Raw/CHARLS/2014/2014-data-goes-here
- 2015 CHARLS: Data/Raw/CHARLS/2015/2015-data-goes-here
- 2018 CHARLS: Data/Raw/CHARLS/2018/2018-data-goes-here
- 2020 CHARLS: Data/Raw/CHARLS/2020/2020-data-goes-here
- HAALSI: Data/Raw/HAALSI


===================================
Code (HRS diabetes mortality/Code):
===================================
- 01_01_diab-mort-hrs.do (don't need to run individually, 01_diab-mort-clean.do runs this)
	- Purpose: Clean HRS mortality date (interview and death dates)
	- Output: Data/hrs_dates.dta

- 01_02_diab-mort-mhas.do (don't need to run individually, 01_diab-mort-clean.do runs this)
	- Purpose: Clean MHAS mortality date (interview and death dates)
	- Output: Data/mhas_dates.dta

- 01_03_diab-mort-charls.do (don't need to run individually, 01_diab-mort-clean.do runs this)
	- Purpose: Clean CHARLS mortality date (interview and death dates)
	- Output: Data/charls_dates.dta

- 01_04_diab-mort-haalsi.do (don't need to run individually, 01_diab-mort-clean.do runs this)
	- Purpose: Clean HAALSI mortality date (interview and death dates)
	- Output: Data/haalsi_dates.dta

- 01_diab-mort-clean.do
	- Purpose: Runs above do files, cleans data, gets statistics for analysis flow appendix 
	- Output: Data/diab_mort_clean.dta

- 02_diab-mort_analysis.do
	- Purpose: Performs analyses, creates tables, some stats for paper (total follow up time, etc.) at bottom of log
	- Output: 
		- Tables/HRS diabetes mortality analysis DATE.xlsx (Table 1, Appendix 6)
		- Tables/Figure1_data.xlsx
		- Tables/Figure2_data.xlsx
		- Tables/Figure3a_data.xlsx
		- Tables/Figure3b_data.xlsx
		- Tables/Appendix7_data.xlsx
		- Tables/Appendix8_data.xlsx
		- Tables/Appendix9_data.xlsx
		- Tables/Appendix10_data.xlsx
		- Tables/Appendix11_data.xlsx

- 03_diab-mort-figures-r.R
	- Purpose: Creates figures 1 and 2 in R
	- Output: 
		- Figures/Figure1_prev_DATE.png
		- Figures/Figure2_mortalityrate_DATE.png

- 04_diab-mort-figures-stata.do
	- Purpose: Create figure 3 and appendix figures
	- Ouput:
		- Figures/Figure3a_forest_DATE.png
		- Figures/Figure3b_forest_DATE.png
		- Figures/Appendix7_forest_DATE.png
		- Figures/Appendix8_forest_DATE.png
		- Figures/Appendix9_forest_DATE.png
		- Figures/Appendix10_forest_DATE.png
		- Figures/Appendix11_forest_DATE.png